﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demos.DesignPatterns._10_装饰器模式
{
    /// <summary>
    /// Mocha装饰器
    /// </summary>
    public class MochaDecorator: CoffeeDecorator
    {

        public MochaDecorator(ICoffee coffee):base(coffee)
        {
        }
        /// <summary>
        /// 定义摩卡咖啡的描述
        /// </summary>
        /// <returns></returns>
        public override string GetDescription() => $"{base.GetDescription()} +摩卡";
        /// <summary>
        /// 咖啡+摩卡，价格+3
        /// </summary>
        /// <returns></returns>
        public override decimal GetCost() => base.GetCost() + 3m;

    }
}
